import React,{ Component } from 'react'
import Context from "./Context"
export default function HocWithRouter(Com) {
    return class HocWithRouter extends Component {
        render() {
            return (
                <Context.Consumer>
                    {
                        (routerProps)=>{
                            // debugger
                          return  <Com {...routerProps} {...this.props}/>
                        }
                    }
                </Context.Consumer>
                
            )
        }
    }
    
}
